package com.meituan.catering.management.product.biz.model.converter;

import com.meituan.catering.management.product.api.http.model.request.EnableProductHttpRequest;
import com.meituan.catering.management.product.biz.model.request.EnabledProductBizRequest;

import java.util.Objects;

/**
 * @author Believe
 * Date 2022/5/23 17:30
 */
public class EnabledProductBizRequestConverter {
    public static EnabledProductBizRequest toEnabledProductBizRequest(EnableProductHttpRequest request) {
        if (Objects.isNull(request)) {
            return null;
        }
        EnabledProductBizRequest enabledProductBizRequest = new EnabledProductBizRequest();
        //TODO 枚举表示状态
        enabledProductBizRequest.setEnabled(1);
        enabledProductBizRequest.setVersion(request.getVersion());
        return enabledProductBizRequest;
    }
}
